<div class="author__coauthors" data-controller="accordion">
  <% visible_authors.each do |author| %>
    <%= cell "decidim/author", author, layout: :compact %>
  <% end %>

  <% if model.length > MAX_ITEMS_STACKED %>
    <div id="panel-coauthors" class="author__coauthors" aria-hidden="true">
      <% (model - visible_authors).each do |author| %>
        <%= cell "decidim/author", author, layout: :compact %>
      <% end %>
    </div>

    <button id="coauthors-trigger" data-controls="panel-coauthors" class="button button__sm button__text-secondary">
      <span><%= t("decidim.collapsible_list.hidden_elements_count", count: model.length - MAX_ITEMS_STACKED ) %></span>
      <span><%= t("decidim.collapsible_list.see_less") %></span>
    </button>
  <% end %>
</div>
